#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QMenuBar* menubar = new QMenuBar();
    this->setMenuBar(menubar);

    QMenu* menuParent = new QMenu("父菜单(&F)");
    menuParent->setIcon(QIcon(":/cat.jpg"));
    menubar->addMenu(menuParent);

    QAction* action1 = new QAction("1(&Q)");


    menuParent->addAction(action1);



}

MainWindow::~MainWindow()
{
    delete ui;
}

